from pydantic import BaseModel, Field


class LoginRequest(BaseModel):
    username: str
    pwd: str


class RegisterRequest(BaseModel):
    username: str = Field(..., min_length=3, max_length=20, description="用户名，3-20个字符")
    password: str = Field(..., min_length=6, description="密码，至少6个字符")
    email: str = Field(..., description="邮箱地址")
    phone: str = Field(..., description="手机号码")